-- GENERATED SPELL FOR [Cultist Necrolyte] --


function spell0_25651(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(18266,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25651', 15000, 1)
end

function spell1_25651(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25651', 3000, 1)
end

function Sorts_25651(pUnit, Event)
local choix_sorts_25651 = math.random(0, 1)
if choix_sorts_25651 == 0 then
pUnit:RegisterEvent('spell0_25651', 1, 1)
end
if choix_sorts_25651 == 1 then
pUnit:RegisterEvent('spell1_25651', 1, 1)
end
end

function mob25651_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25651', math.random(1500, 3000), 1)
end

function mob25651_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25651_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25651_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25651, 1, 'mob25651_Action')
RegisterUnitEvent(25651, 2, 'mob25651_Leave')
RegisterUnitEvent(25651, 3, 'mob25651_Kill')
RegisterUnitEvent(25651, 4, 'mob25651_Die')
